﻿ 
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace UserPower.Models
{
    public class SysUser
    {
        public int ID { get; set; }

        
        [StringLength(10, ErrorMessage = "登录帐号不超过10个字母"),Display(Name ="登录帐号", Description ="英文字母组成,不得超过10字"),Required( ErrorMessage ="不得为空")]
        public string FloginID { get; set; }

        [StringLength(10, ErrorMessage = "用户姓名为不超过10个汉字"), Display(Name = "用户姓名", Description = "汉字，不得超过10字"), Required(ErrorMessage = "不得为空")]
        public string UserName { get; set; }

        [Display(Name = "密码"), Required(ErrorMessage = "不得为空")]
        public string Password { get; set; }

        [Display(Name = "所属部门")]
        public int? SysDepartmentID { get; set; }

        [Display(Name = "所属部门")]
        public virtual SysDepartment Department { get; set; }

        //角色S
        public virtual ICollection<SysUserRole> SysUserRoles { get; set; }

         

    }
}